package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.family.MobileCodeSendRecordSearchRequest;
import com.tuanzi.loan.vo.response.family.MobileCodeSendRecordSearchResponse;
import com.tuanzi.loan.business.service.family.MobileCodeSendRecordService;

/**
 * 手机验证码发送记录 DataModel
 * @author JinRuiyang 2017/12/21 16:50:25
 */
public class MobileCodeSendRecordDataModel extends
        BaseLazyDataModel<MobileCodeSendRecordSearchRequest, MobileCodeSendRecordSearchResponse> {

    private MobileCodeSendRecordService mobilecodesendrecordService = SpringContextHolder.getBean(MobileCodeSendRecordService.class);

    public MobileCodeSendRecordDataModel(MobileCodeSendRecordSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<MobileCodeSendRecordSearchResponse> doLoad(PageSearcher<MobileCodeSendRecordSearchRequest> pageSearcher) {
        return mobilecodesendrecordService.list(pageSearcher);
    }
}
